home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / RAND / DVIEW000.LZH / DOOM.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-10  |  2.9 KB  |  137 lines

  1. /********************************************************************
  2.  FILENAME: DOOM.H
  3.  AUTHOR  : JAKE HILL
  4.  DATE    : 12/1/94
  5.  
  6.  Copyright (c) 1994 by Jake Hill:
  7.  If you use any part of this code in your own project, please credit
  8.  me in your documentation and source code.  Thanks.
  9. ********************************************************************/
  10.  
  11. #ifndef DOOM_H
  12. #define DOOM_H
  13.  
  14. #undef line
  15.  
  16. typedef struct
  17.         {
  18.            char signature[4];
  19.            unsigned long num_entries;
  20.            unsigned long foffset;
  21.         } WAD_Header;
  22.  
  23. typedef struct
  24.         {
  25.            unsigned long foffset;
  26.            unsigned long size;
  27.            char name[8];
  28.         } Directory_Entry;
  29.  
  30. typedef struct
  31.         {
  32.            short x;
  33.            short y;
  34.         } vertex;
  35.  
  36. typedef struct
  37.         {
  38.            short from, to;
  39.            short flags, special, tag;
  40.            short side[2];
  41.         } line;
  42.  
  43. typedef struct
  44.         {
  45.            short tm_xoffset, tm_yoffset;
  46.            char upper_tx[8];
  47.            char lower_tx[8];
  48.            char main_tx[8];
  49.            short sector;
  50.         } side;
  51.  
  52. typedef struct
  53.         {
  54.            short floor_ht;
  55.            short ceiling_ht;
  56.            char  floor_tx[8];
  57.            char  ceiling_tx[8];
  58.            short light;
  59.            short type;
  60.            short trigger;
  61.         } sector;
  62.  
  63. typedef struct
  64.         {
  65.            short from, to;
  66.            unsigned short angle;
  67. #ifdef __GNUC__
  68.            short line;
  69. #else
  70.            short xline;
  71. #endif
  72.            short line_side;
  73.            short line_offset;
  74.         } seg;
  75. typedef seg segment;
  76.  
  77. typedef struct
  78.         {
  79.            short num_segs;
  80.            short first_seg;
  81.         } ssector;
  82.  
  83. typedef struct
  84.         {
  85.            short x, y;
  86.            short dx, dy;
  87.            short ry2,ry1,rx1,rx2;
  88.            short ly2,ly1,lx1,lx2;
  89.            unsigned short right,left;
  90.         } node;
  91.  
  92. typedef struct
  93.         {
  94.            short x, y;
  95.            unsigned short angle;
  96.            short thing_type;
  97.            short attributes;
  98.         } thing;
  99.  
  100. typedef struct
  101.         {
  102.            short x_origin, y_origin;
  103.            short columns, rows;
  104.            short *blockpointers;
  105.         } blockmap_header;
  106.  
  107. typedef short blockmap;
  108.  
  109. /****************************************************************
  110.  * Additional structures created by me.
  111.  ****************************************************************
  112.  */
  113.  
  114. typedef struct
  115.         {
  116.            char tex_code;     /* Added by Johan */
  117.            char type;
  118.            char opaque;
  119.            long y1, y2;
  120.            long dy1, dy2;
  121.         } wall;
  122.         
  123. typedef struct
  124.         {
  125.            short tex_num;
  126.            short hight;
  127.            short start, end;
  128.         } floor_run;
  129.  
  130. typedef struct
  131.         {
  132.            short tex_num;
  133.            short top, bottom;
  134.         } wall_run;
  135.  
  136. #endif
  137.